Product
Introducing License Enforcement in Socket
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
markdown-it-abbr
Advanced tools
The markdown-it-abbr package is a plugin for the markdown-it Markdown parser that allows you to define and use abbreviations in your Markdown documents. It provides a simple syntax for defining abbreviations and their expansions, which can then be used throughout your document.
Define Abbreviations
This feature allows you to define abbreviations and their expansions using a simple syntax. In the example, 'HTML' is defined as 'Hyper Text Markup Language' and 'W3C' is defined as 'World Wide Web Consortium'.
const md = require('markdown-it')().use(require('markdown-it-abbr'));
const result = md.render('The HTML specification is maintained by the W3C.
*[HTML]: Hyper Text Markup Language
*[W3C]: World Wide Web Consortium');
console.log(result);
Use Abbreviations
Once abbreviations are defined, you can use them throughout your document. The plugin will automatically replace the abbreviations with their expansions when rendering the Markdown to HTML.
const md = require('markdown-it')().use(require('markdown-it-abbr'));
const result = md.render('The HTML specification is maintained by the W3C.');
console.log(result);
The markdown-it-footnote package is another plugin for the markdown-it parser that allows you to add footnotes to your Markdown documents. While it serves a different purpose than markdown-it-abbr, both plugins enhance the functionality of markdown-it by adding support for additional Markdown syntax.
The markdown-it-deflist package adds support for definition lists to the markdown-it parser. Similar to markdown-it-abbr, it extends the capabilities of markdown-it by introducing new syntax for a specific type of content, in this case, definition lists.
The markdown-it-container package allows you to create custom containers in your Markdown documents. This plugin is similar to markdown-it-abbr in that it extends the markdown-it parser with additional functionality, but it focuses on creating custom block-level containers rather than handling abbreviations.
Abbreviation (
<abbr>
) tag plugin for markdown-it markdown parser.
v1.+ requires markdown-it
v4.+, see changelog.
Markup is based on php markdown extra definition, but without multiline support.
Markdown:
*[HTML]: Hyper Text Markup Language
*[W3C]: World Wide Web Consortium
The HTML specification
is maintained by the W3C.
HTML:
<p>The <abbr title="Hyper Text Markup Language">HTML</abbr> specification
is maintained by the <abbr title="World Wide Web Consortium">W3C</abbr>.</p>
node.js, browser:
npm install markdown-it-abbr --save
bower install markdown-it-abbr --save
var md = require('markdown-it')()
.use(require('markdown-it-abbr'));
md.render(/*...*/) // see example above
Differences in browser. If you load script directly into the page, without
package system, module will add itself globally as window.markdownitAbbr
.
FAQs
tag for markdown-it markdown parser.
The npm package markdown-it-abbr receives a total of 143,458 weekly downloads. As such, markdown-it-abbr popularity was classified as popular.
We found that markdown-it-abbr demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
Product
We're launching a new set of license analysis and compliance features for analyzing, managing, and complying with licenses across a range of supported languages and ecosystems.
Product
We're excited to introduce Socket Optimize, a powerful CLI command to secure open source dependencies with tested, optimized package overrides.